package com.derekandbritt.booST.gps;

import com.derekandbritt.booST.preferences.Preferences;

import android.content.BroadcastReceiver;
import android.content.Context; 
import android.content.Intent; 
import android.content.SharedPreferences;
import android.util.Log;
 

public class StartupManager extends BroadcastReceiver { 

	@Override
	public void onReceive(Context context, Intent intent) {
		
		Log.i("com.derekandbritt.booST.gps", "initializing booST Services!");
		SharedPreferences settings = context.getSharedPreferences(Preferences.BOOST_PREFS, 0);
            
		if(settings.getBoolean(Preferences.GPS_ENABLED_PREF, false)) {
			GPSService.startGPS(context);
		}
        	
	} 
}